# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: andy123 < ajs [at] online [dot] de >

pkgname=mari0
pkgver=1.6.2
pkgrel=3
pkgdesc="The Mario game with Portal gun mechanics"
arch=('any')
url="http://stabyourself.net/mari0/"
license=('CCPL')
depends=('love')
makedepends=('zip')
source=(${pkgname}.sh
        ${pkgname}.desktop
    	$pkgname-$pkgver.tar.gz::https://github.com/Stabyourself/mari0/archive/${pkgver}.tar.gz)
sha512sums=('84d237f82ba1ad5d6c52d66d27469de7044572626381af07230b46a476eb077bce94329408cf4e0c0f4ae1c90a7adf6562dc1ca795591a7687608a253af6b705'
            '0e9f73b5e0c5fe897b4587b30be379380e563f4eef0610fdf88d23a72265333d182ec6164f5c7c9313f81be68b40cc5b579bd5a2e468138445301e4c56c64499'
            '3d1353f12f02fd993e309cac7ab653c3cbc8a60e8585663186870b5ea49542f46ec2c554711bba710febaf3ad73c7bf66cfba2ccbe4831aa7d5cb2fe5aab8992')

package() {
    # Make love package
    cd "${srcdir}"/${pkgname}-${pkgver}
    zip -r9 "${srcdir}"/${pkgname}.love *

	# Install Data
	install -Dm755 "${srcdir}/${pkgname}.love" "${pkgdir}/usr/share/${pkgname}/${pkgname}.love"
	install -Dm644 "${srcdir}/${pkgname}-${pkgver}/README.md" "$pkgdir/usr/share/${pkgname}/README.md"

	# Install Launcher
	install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"

	# Install Desktop
	install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
    install -Dm644 "graphics/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
}
